package com.yfp.operation.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yfp.common.core.annotation.Excel;
import com.yfp.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/**
 * @Description: 分成账单
 * 
 * @CreateDate: 2024/5/28 13:36
 * @UpdateUser: 
 * @UpdateDate: 2024/5/28 13:36
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
@Data
@Tag(name = "用户分成账单")
public class UserBill extends BaseEntity {
    /**
     * 主键
     */
    @Schema(description = "主键")
    private Long id;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 订单编号
     */
    @Schema(description = "订单编号")
    @Excel(name = "订单编号", needMerge = true, sort = 2)
    private String orderSn;

    /**
     * 订单支付金额
     */
    @Schema(description = "订单支付金额")
    @Excel(name = "交易金额", needMerge = true, sort = 3)
    private BigDecimal payMoney;

    /**
     * 分成金额
     */
    @Schema(description = "分成金额")
    @Excel(name = "分账金额", needMerge = true, sort = 7)
    private BigDecimal money;

    /**
     * 手续费
     */
    @Schema(description = "手续费")
    private BigDecimal fee;

    /**
     * 分成比例（百分比）
     */
    @Schema(description = "分成比例（百分比）")
    @Excel(name = "分账比例（%）", needMerge = true, sort = 4)
    private BigDecimal proportion;

    /**
     * 手续费比率（百分比）
     */
    @Schema(description = "手续费比率（百分比）")
    @Excel(name = "交易手续费（%）", needMerge = true, sort = 5)
    private BigDecimal feeRate;

    /**
     * 退款金额
     */
    @Schema(description = "退款金额")
    private BigDecimal refundMoney;

    /**
     * 状态:1冻结,2已入账,3已提现
     */
    @Schema(description = "状态:1冻结,2已入账,3已提现")
    private Integer status;

    /**
     * 订单支付平台:1支付宝,2微信
     */
    @Schema(description = "订单支付平台:1支付宝,2微信,3 余额支付")
    private Integer payType;

    @Schema(description = "设备编号")
    @Excel(name = "设备编号", needMerge = true, sort = 1)
    private String machineId;

    @Schema(description = "设备名称")
    private String machineName;

    @Schema(description = "设备名称")
    private Integer freezeDay;

    @Schema(description = "点位ID")
    private String positionId;

    @Schema(description = "接收分账账号")
    private String receiveAccount;
    /**
     * 总冻结资金
     */
    @TableField(exist = false)
    @Schema(description = "总冻结资金")
    @Excel(name = "当前待结算资金", needMerge = true, sort = 8)
    private Double allFreezeMoney;

    /**
     * 可提现金额
     */
    @TableField(exist = false)
    @Schema(description = "可提现金额")
    @Excel(name = "可提现金额", needMerge = true, sort = 9)
    private Double canWithdrawMoney;

    /**
     * 已提现金额
     */
    @TableField(exist = false)
    @Schema(description = "已提现金额")
    private Double alreadyWithdrawMoney;

    /**
     * 交易时间
     */
    @TableField(exist = false)
    @Schema(description = "交易时间")
    @Excel(name = "交易时间", needMerge = true, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 6)
    private Timestamp payTime;

    /**
     * 创客列表
     */
    @TableField(exist = false)
    @Schema(description = "创客列表")
    @Excel(name = "收款方名字&账号", needMerge = true, sort = 10)
    private List<PositionSharing> positionSharingList;

    @Schema(description = "微信分账账户")
    private String independentAccount;

    @Schema(description = "分账用户ID")
    private Long independentUserId;

    @Schema(description = "用户类型")
    private Integer userType;

    @Schema(description = "赠送金额")
    private BigDecimal giftGold;

    @Schema(description = "用户充值记录ID")
    private Long clientBillId;

    @Schema(description = "用户昵称")
    @TableField(exist = false)
    private String nickName;

}